package com.itheima.day03;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        while (true) {
            System.out.println("请输入转账金额：");
            Scanner scanner=new Scanner(System.in);
//        double v = scanner.nextDouble();
            String s = scanner.next();

            BigDecimal bd = new BigDecimal(s);
            BigDecimal bigDecimal = BigDecimal.valueOf(Double.valueOf(s));
            BigDecimal b = bigDecimal.multiply(BigDecimal.valueOf(100));
            System.out.println(b.toString());
            BigDecimal d = b.divide(BigDecimal.valueOf(100),2, RoundingMode.DOWN);

            System.out.println("d = " + d);
        }
    }
}
